Repository navigation
feat(voice-line): step 1 — push-to-talk DO, Whisper STT + MeloTTS out, VAD trim, Turso ledger (#9800) - #10039
Conversation
…, VAD trim, Turso ledger (#9800) New pm-stack/voice-line-worker (task 16482): VoiceSession Durable Object serving a push-to-talk WebSocket; PCM16 audio is VAD-trimmed (head/tail cut, long pauses collapsed) and only trimmed audio is submitted to Workers AI Whisper; the one read-only intent (queue state, from fleet-pushed Turso snapshots) is answered in text and spoken back via MeloTTS per Drews 2026-11-14 talk-back amendment; every utterance writes a Turso session-ledger row (transcript, intent, answer, audio seconds in/out). bun test 9/9, tsc clean. Deploy (Turso DB + secrets + wrangler deploy) and the live voice proof remain — see README deploy section.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 16 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
🤖 Agent note · picked up — task 17366 (pr_shepherd: merge PR #10039)
|
|
🤖 Agent note · done — task 17366: PR #10039 MERGED
|
Step 1 of the basement voice line for #9800 (task 16482) — code complete; deploy + live voice proof remain (account-side), tracked on the issue.
New package
pm-stack/voice-line-worker(follows thedecision-events-workerconventions):src/session.ts—VoiceSessionDurable Object: push-to-talk WebSocket (PCM16LE 16 kHz streamed while the button is held,{"type":"stop"}to process). One DO per session id.src/vad.ts— energy VAD + silence trim: head/tail cut, long internal pauses collapsed. Only trimmed audio is submitted to transcription — silence is never billed (Workers AI charges per submitted minute) and never transcribed. Pure + unit-tested.@cf/openai/whisper-large-v3-turbo) via theAIbinding, called directly.@cf/myshell-ai/melotts) speaks the answer back in the same session — Drew's 2026-11-14 amendment ("it must talk back"); OpenCode: Whisper STT + TTS as routed pool models — failover, proxying, silence auto-trim #9801 stays the pooled/failover companion and is not built here.src/intent.ts— the one read-only intent: queue state, answered from the newest Tursostatus_snapshotsrow (fleet pushes snapshots via the token-guardedPOST /ingest-status). No write actions over voice; anything else gets a spoken explanation of the capability.src/ledger.ts— Turso session ledger over the libsql HTTP pipeline (no SDK): session id, timestamps, transcript, intent, answer, audio seconds in (post-trim) and out, both model ids. Schema created idempotently.src/index.ts— routes (/,/ws,/health,/ingest-status) + the push-to-talk page (MediaRecorder-free: ScriptProcessor PCM capture, plays the spoken answer).wrangler.toml— AI binding, DO binding + migration;TURSO_URLis a var placeholder,TURSO_TOKEN/STATUS_INGEST_TOKENare secrets (README documents the one-time setup).Verification (laptop, this branch):
bun test9/9 (VAD trim/collapse/all-silence + intent matching/answers),bunx tsc --noEmitclean. No live deploy yet: creating the Turso database, setting the two secrets, andwrangler deployare account-side steps listed in the README, after which the acceptance proof is one spoken queue-state question with its row visible in the ledger.Refs #9800 (does not close it — the live end-to-end voice proof is the remaining acceptance item).
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.